package jp.sourceforge.akjrcp.flvtools.dvdstyler;

import jp.sourceforge.akjrcp.akj_betas.Akj_betasPlugin;
import jp.sourceforge.akjrcp.akj_betas.Messages;

import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;




/**
 * This class represents a preference page that
 * is contributed to the Preferences dialog. By 
 * subclassing <samp>FieldEditorPreferencePage</samp>, we
 * can use the field support built into JFace that allows
 * us to create a page that is small and knows how to 
 * save, restore and apply itself.
 * <p>
 * This page is used to modify preferences only. They
 * are stored in the preference store that belongs to
 * the main plug-in class. That way, preferences can
 * be accessed directly via the preference store.
 */


public class DVDStylerPage
	extends FieldEditorPreferencePage
	implements IWorkbenchPreferencePage {

	public static final String DVDSTYLER_PATH="dvdstyler.path";
	public DVDStylerPage() {
		super(GRID);
		setPreferenceStore(Akj_betasPlugin.getDefault().getPreferenceStore());
		setDescription(Messages.getString("dvdstyler_setting"));
		initializeDefaults();
	}
/**
 * Sets the default values of the preferences.
 */
	private void initializeDefaults() {
		
	}
	
/**
 * Creates the field editors. Field editors are abstractions of
 * the common GUI blocks needed to manipulate various types
 * of preferences. Each field editor knows how to save and
 * restore itself.
 */

	

    protected void createFieldEditors() {
    	
        
        FileFieldEditor exeField=new FileFieldEditor(
                DVDSTYLER_PATH, Messages.getString("dvdstyler_path"),getFieldEditorParent()); //$NON-NLS-1$
        exeField.setFileExtensions(new String[]{"DVDStyler.exe"}); //$NON-NLS-1$
        addField(exeField);
        
    	
    }
	
	public void init(IWorkbench workbench) {
	}
}